remove extraneous function, merge into run() function for clarity