return buffer instead of string