adjust _new_capacity function.