correcting syntax and fixing tests