fix pry and add history support