Refactor function's parameters order