completed stub code for assignment 2