made context more resource generic