updated for new deliver() additional parameter - instead of a doFree, it is replaced...