refactoring the reflection