add a run call for analysis.fun() and a call to q() to main.r