move averaging out from concretepattern into continuousfunction