before switching homepage