Created some functions for worksheet 3