Added more logic for footer