added an efficient image loader