tidy up functions for association lists