Added optimization to reduce codesize