rewrite of sattrack