minor improvements
added solution for assignment 2, verified results