Add utility functions. Finish part 8.