Added analyzing function