add functionality to add a resource