update test, refactoring