198 migrate to pure js