Rename id to index and predefine