Add unlock and ungroup function