small refactoring
update test