fixed typos, syntax error in code