implement the function of inbox