Move block function