checking permissions