added linked list and command line option to turn off type checking