bug by algorithm
again bug