use new get code_dir method