modified the way ids are handled