small changes to analysis code.