changed id generation