can now do average of functions