adapted resolve to invoke service for state