lab8 complete with wait problem