finished assignment and started to refactor