refactoring arrayCollection transformation