Assignment 1 functions.