The given sentence belong to conditional sentence Group 11 which indicates an improbable condition and has the form--- If clause +simple past tense and could/might/should/would+base form of the verb in the main clause. The first person singular will always be were