implement array comprehension