moved function into example repro