segmentation faults - messy updates