adding code that makes the image pyramid