fix some syntax in function declaration

Ensure function declarations are declared as follows:

```
function_name [()] {
    command...
}
```