added permission management function