Yes! I was trying to write the feature I wanted but failed. I tested your code.. works perfect, but like you said, it does not have the feature of accepting and rejecting clients.
I will work more on it and update this post if I find a way to do it.
Thank you..