some syntax errors fixed