updated extractSnps.R