halfway done with assignment 2