[buffer] iterate using pointer