added flask context functions for working with hem