changed auto-load method