detect overflow