check for overflow better