modified some script things to allowing piping from ssh