pad array refactor