added digestion logic