update ternjs