footer logic