be more efficient in buffer capturing