bugfix removal algorithm