abstract resources into handler