Assignment 2 Functions