adds autoloading and json type