move code in from teos10