added permission reference generation