stack and queue have passed test
begin to work