some refactoring
test finale passed