find_by_path improvement