Implemented iterative deepening