a readline function.

didn't add comment in last commit...now added.