finished sonar error program