result and optimization