modifying single_output to more suit single_output