added a small amount of analysis code