create a global load function