added SetDisplayFunction()