optimize some details