reordering and added demo for custom id