fixed obvious syntax errors and improved readability