new method of specifying function