rewrite preload method