Wrote entire interator for queue and integrated it.