added a partial function factory