refactoring
update tests