added pruning and currently set to depth of 3