modified context class for resources