Only beginners must use wait() inside while(). According to your forum status you are an expert. So you have now my permission to use while() without wait().