Modified recieve to work with queue