draw utility, step 1 towards code cleanup and decoupling