Revert to JS version