tidy up output for command extract command