initial checkin of queue reading code - no tmodularized