fix missing space
change order of functions
removed unused function