Added InitializeMoving function