I created this class so I can have a value of any type which is either fixed or recalculated everytime it is used:
template class DynamicVa