start code for sequential GSS matching