27: made some refactoring