syntax errors fixed, seems to run properly