added some reflection magic