added missing sampe flags...
fixed input error, but pin/min seem incorrect in output