refactor and second aggregate