ticket:1 task fix. added tests