added filterarray solution