now compiles; bit-shifting has been replaced with pointer arithmetics