implement the function of outbox