changed from constants to fixed bit numbers