Adapting Scanner

Not fully tested