Started part b of project. Still needs comments and error handling to be
complete