updated to do; revisiting pi code