fixed readline bug. need to write cmdline opts