first version of simple scanner