modified structure to allow autoload