refactoring
fix test