003: adapt has_fruit function