added link to stackoverflow for _ranges code