Adding answere of assignment2