CS151 assignment 7