correctly pass stdin