now accepts end point and emails results