client-side clean up