code tidy, simplified issue reproduction