add handle_sh and handleany_sh functions