minor changes to analysis code