fixes lots of syntax errors