refactored header to be part of view