update to JS array methods