Adding first draft of my second homework from coursera's assignment.