interact by using stdin