fixed some syntax. but formatting for function issue got worse