working on resv thread