separate sample id function