Added getNextId