refactor
update tests