revert to use readline()