add messagequeue code