clean bash script
first mapping then filtering so we can see a porportion of transitions