rewrited to ts, vs project