added solution for course assignment 2