Completed setCenter() method