array helper improved