Removed if else .. if else from the navigation and create moved this to helper method