implement history
improve navigation handling