Added utility code for reflection