common code for trimming off useless subjects from sentences