Edited program to use my own functions and modified instructions in html.