updates to analysis code