resolves compare loop issue