move post move logic to separate function