new changes by Erik and jtf