Modified scanner to create strings