Modified code for the future

Added z movement for the future. It is part of navigateTo(), if
navigateTo() is called with only 2 arguments no z movements will occur
keeping it compatible with all previous calls to navigateTo()