Abstracted repetitive id logic