Adding centerOnPage() method.