make goBack public and add canGoBack.