naive implementation of myers algorithm, backward greedy variationw