added recursive option