added navigation logic as well as animation