added basis, generalized centerXY