update for performance. fix #1