committing the code for assign 2