fixed the TODO; now looking for next object id, instead of increasing objectid by 1 until we find the next object. Going to add some unit tests to test this functionality