added proper calls to main
added io for hex numbers