adjust parameters, fix regexp tokenizing