Fixed syntax errors and tested