some work on id generation