added another function layer for filter function