Added comments

and moved the function caller at the end of the code.