using wrong variable name for scanAll