refactored header & footer