modified for output to ssh