tidy up and add client