some code reduce