added basic syntax checking