Add some reusable functions for these exercises