added center method to display2D