extract ref numbers