update code base from totte