added getFirstFreeID