trying to reduce complexity for code climate grade.