added functions to reduce the number of commands
fixed navigation bug