refactoring herbivore