add readline support