get currentRoute from PreviousRoute added

and clean up code