added more analysis code