small changes to JS