only calculate next_id when we need a new method defined