generalize custom ID support