add getCenter methods to rectangle