corrected validation errors
made more sonar compliant