change data type from queue() to pid()