change read stdin function