uploaded completed solution minus one method, reflection