refactoring inbound endpoint core