changed to use email as key