some improvements for readline