fix syntax error in object method