coffee refactored