trying to find best way to handle thread transitions