declare buffer as const