working on wait data structures