refactored header resolver plugin