reorganized version check and imports
typo in comments
fixed bug: not properly outputting header