reworked identification to happen after check for privileges