add statistic + some fixes