added support for returning row ids