added example file in doc; cleaned up load function