largely untested proof of concept (curried fns)