some syntax errors corrected