Add optimization and comment