refactored header/footer