changed the way ids are generated for presence