buffer array replaced by one variable