TERN stuff
merge changes