added final filtering