fixed id part and cleaning function, NOT sure if we have to create IDs for baseline.

Might need to work on that as well.