first attempt at correct bit shifting out, not working
merging changes