finish the function of messagebox