moved priv_dir function into rt 2