add monitoring of performance and some fixes