cleaning up according to sonar