clarified the output function unpacking