updated code of analysis