Create ungroup function for C3