init queue with q, and add print, free operation
pointer problem