add treaking functionality