refactor image path generation into a function
selective image preloading

in addition to loading the current image, we also load the next 4