code merged with navigation stuff with master