Refactor delta to direction