completed assignment 2 for coursera.org