start sweet and prune algorithm