tidy up our functions some more