Add solution for refactor pad_array