"about to modify code to add rf cavity simulation"