pull out data filter into mfunction constructor