refactor: extract to formatted_params