add scanner that works on a buffer