This is a class assignment, I'm still working on improving some of the functions