programs from blog http://flank1er.blogspot.ru