created functions, changed structure to be like an actual program, and wrote comments/docstrings for functions and stuff