Implement partition method