add support for partials with params, with appropriate refactoring.