update to work with latest tern