simplified reflection code