ex 2.20 (add recursive version) by vvalkyrie