Support for tern mode added