email function added