reworked the recursive delete thanks to dragans investigation