change type string to void in goBack and goForward