How to build my own Scanner?