added recusiveSearch(), added output statistics