add analyze function
modify analyze