Added optimization test