added database caching to greatly decrease load times