Improve client db

this adds the functionality mentioned in #7 
sure. I'll change it.