Delete min function