added codegen for some complex ops