For assignment 4 Contract Based