made setCenter simpler