add recursive mode