JS update for new API