new algorithm for 3-jet-mass