update for better efficiency