parted out the drawpiece update to a function