improve id generation