fixes #3
adding support for smallint and mediumint
fixes #5