code formatted
fixed mail bug