changed names of some other functions and variable and minimize code by
deleting some useless blanks and fixed some syntax
changed some order of codes and name of functions and variables