changed to bitshifting as it looks more professional