solution of assignment 4