better display of function definition, and remembered to format the code
Added return and assignment statements