renamed and clean up in client