for project code
refine email function