adds unique index

So you can generate the same ID with the previous code and adds a index for faster response times from mongoDb.