bit shifting, trying to get it to run faster
working on porting this utility to python