fix some code climate complexity
coverage tests