bug fixes: threshold on gradients
Merge branch 'master' of https://github.com/annsimon/bit_shadows
changes for calling method2