improved overpopulation calculation