Modified through to work with wrap-fn and value-fn