implemented preloaded to work with all ajax