moved version check definition into code
added smartcast type setting support
added type