added email link and clear function