putting together maxfrequencyinwrapper