hw4
refactor
making ready for hw6