rewrite to simple tec