updated separation script