simplified array handling