moved generic functionality from resolver to helper