Started to implement functional by article http://suvitruf.ru/2012/10/31/2464/