changed bitwise to smallint