updates to sonar.c