changed bitwise to smallint unsigned