non-linear patterns (inspired by egison)