added style optimization