parentheses are not required anymore in if/do/while statements
fixed indentation
added function signatures as type