Completed Code for Assignment