Analysis code added