factor calls to hanging_pieces()