Programming Assignment 2 edited and submitted by czhang101