draft boundary and residuals work based on PCA/regression