adding partner params and refactoring