also consider reverse prefix
logging improved