Changed getEmails from static method to non-static