finalized typescript conversion, finalized path finding