Refactored params to functions