fixing many syntax issues