factories, tests, array helper