changed usages of the do function