Added repart wrapper function