clean up regression code