changed function names, syntax errors