better to make the resolver a class on its own