added id table generation logic