There was a semicolon on the end of the if!!!! WHY!!! but fixed now