refactored stringify
added format argument, operator, for stringify