buffer variable trim