using promises to chain background loading
improvements to promise approach