filter array method and test