fixed function syntax error