updetad spin pattern recognition in mk_tree.C