added SetFormatter function for issue #3