[stroy 2] implemeted functionality, need to further refactor