improoved the statistic
put some throws into the code to find malformated data