refactored code running but not exiting depth 0 correctly
separated into last ghost and not last ghost cases in min_value