adding analysis code