experimenting with an overflow-safe version