rework the mail method