fixed syntax and check errors