add toString boolean option to return formatted text