scan and conditionals