Read-direction function.