not feasible to reuse function