finished optimalization/code report