cleaned up and added some click functions to permissions