started filling in functions with comments describing procedures