Filled in functions for homework.