modification of moveCell procedure