updated replace_dict in query_repack_env()
added replace_dict in mar.py