refactor some of the solution code