now added main function which generates unique id and required
permissions