add basic update functions to JS