testing greedy search