added logic for detecting when it is the front page