changed Stack for ArrayDeque