fill out functionality for assignment 2