convert to JS SPA