adds return_out option to multip_sh_terms