try to solve code pattern run test fail on codacy