Add comments for the program and the two functions