solution of assignment 2