Completed 3 functions, commented out other 3 that are most likely incorrect