added code for asignment 2