work on preloading functionality