allow id to be an object