made tests and corrected syntax errors