second attempt to solve itemwait problems