added checking admin permissions