streamlined parameter scanning code