revised based on Martin's comments to take out .filter and create 'return array'