explain and optimize done