improves the resource API