Updates to JS solution