add recursive method