friend of inner function