return string by default and add extra method for returning buffer