add a utility function for contexts