classic scanning, first time w/ stacks