Comments and calling

Added comments and called the function. Tested in browser.