added preload-function