implemented navigation handling