fixed api call and emails