added support for smallint