Added code for assignment #3