CS20 Programming assignment 2