move get_path(), and modify if statement