cleanup for client side use