implemented formatting for strings to be passed to mitch