Low priority: I think, it could be better, need to write tests and try to refactor.