details and optimization