refactor
refactor, tests updated