adding in syntax checking