changed navigator so it is a switch statement