Permission Final Version

Clear code and comment added!!