add function for (re)computing the bin of an alignment