add readln and readpwd support