updated segue logic
merged in master
added new navigation and layout logic