use int for shift amounts. Implement more functions.