working implementation. repipe the messages