refactoring: use params.slice