make cubes move back and forth