sq_dance support functions