upgrade tern