functional code for updating TT