more flux analysis code