Updated the sample to work with generic id type