Refactor top five block
Refactor top file block using the map method.