find prefix before continuing