added overflow check after addition