alternate scanner approach