1. clean up code based on sonar report