Updated so the consumer no longer uses an anonymous inner class for better readability, and reuse of code