Working part 3 of proj gut with functions