removed old resourceToModel method