animation timing

Added animation loop to dom squares.