tern works