rewrote by using :allow-head-p.