crib code from slide for helicopter talk and optimizing tutorial