Added syntax checking