implemented referal, works except for sending the actual email