checking for permissions