Final Project code for cos445