crashing bug caused by entering non existent function fixed;
cos optimized a bit;