separate drawing from updating logic