added weight checker and send mail functions