slight change in fermata algorithm