worked on the mp method for assignment 1