add support for tern