changed up for loop to fit mongoose constructors