improved again through sonar suggestions