added support for id ranges