added pie.  working before threading