much more efficient thumb computation