Add JS implementation