Proper id generation