some refactoring, showing resolve in ng