changed name of some function and variables.