added arg for overhang length and a threading stub function