added dynamic totaliser