added recursive feature