read from stdin using readline