bitshifting problem - slows down