edits to main.js for looping through objects and moving / copying things around