improvements done with caching as well as with the monitoring table This should now also work for distributed setups but is not fully tested yet