refactored carrot