Corrected syntax error. Added tests