fix formatting and syntax issues