round the capacity up to the nearest power of two instead of throwing IllegalArgumentException