three working functions for part 1.