changed tinyint(1) from int4 to int2