changing resource pulls to an API layer