Improving code of Algorithm and Operator