update "stack and queue"