Added code to complete the assginment