Added navigation logic