initial commit
refactored code and tests passing