solution of the assignment