move a part of the method body
use correct Deque