Updated version of tern