fix syntax and clean up