With functions

File with functions for Assignment 2