CS20 programming assignment 2