added higher-order function of filter and map