finished refactor decrease 2 function