checking for overflows