resolved some issues with recursive searching