fixes #3,#4,#5 adding smallint and mediumint

formatting the code