added autoload functionality