Still WIP: start with calculating average values recursively (not proper trigger mechanism implemented)