added print function-setting function