findmin corrected