 	typealias A = UInt8
 	public static func arbitrary() -> Gen<UInt8> {
 		return sized({ n in
-			return Gen<UInt8>.pure(UInt8(truncatingBitPattern: arc4random()) % UInt8(truncatingBitPattern: abs(n)))
+			return sized { n in Gen<UInt8>.pure(UInt8(arc4random_uniform(UInt32(abs(n))))) }
 		})
 	}
 

extension Int8 : Arbitrary {
	typealias A = Int8
	public static func arbitrary() -> Gen<Int8> {
		return sized({ n in Gen.pure((Int8(arc4random()) % (n + n + 1)) - n) })
	}

	public static func shrink(x : Int8) -> [Int8] {

extension Int : Arbitrary {
	typealias A = Int
	public static func arbitrary() -> Gen<Int> {
		let sign = ((arc4random() % 2) == 1)
		return sized { n in Gen.pure((sign ? 1 : -1) * Int(arc4random_uniform(UInt32(n)))) }
	}

	public static func shrink(x : Int) -> [Int] {
