Added sample batch control
Sonar test