check for permissions