added functionality for detecting home route