Added auxiliary functions in preparation for hackathon #4