refactoring array list