revert to old analysis code

revert to old code.