refactored and updated reflection