refactor header.rb