added CodeGen for some scalar ops