Why Syntax error in function declaration?