solutions for assignment2