refactor to_path to use multiple args