change in search_centromere that fixes a problem in alignment function
a bit more against memory leak?