cleanup and hyperplane for ryan to incorporate