merged (only some removed comments for w/e reason)
merge
scanner() works, second function will do the work