coments and performance optimization