upload complete solution, refactor, reflection, fixed formating