try to use readline instead