cleaning up the reflection code