Finish part of filter function