19.11.2014 Radchuk Sergey  some refactoring was done