This code is written by Alexandr Kuznetsov. All rights and credits belongs to him.