scanner mostly done, just needs error checking