text: //function to draw the images
  function loadImages(sources, callback) {
      var images = {};
      var loadedImages = 0;
      var numImages = 0;
  
      // get num of sources
      for(let src in sources) {
        numImages++;
        images[src] = new Image();
        images[src].onload = function() {
          if(++loadedImages >= numImages) {
            callback(images);
            }
          };
        images[src].src = sources[src];
        }
      }
  
  
  
    //start the canvas
    var canvas = document.getElementById('canvas');
    var ctx = canvas.getContext('2d');
  