added create_partition method