update for ArrayList