modifying bq blocks to include the new PIN selection. Added variables_global and local blocks which declare and define the variables.