the find min method