fixed codequality design issues