changed behavior of print_queue (now get_queue). instead of printing in function, it returns (and stores) a list