refactored base class to coffee