Magical function to support reflection