improved test
refactoring