removed extraneous temp from cross_function constructor