Change f -> f(n), g -> g(n)