added debugging for client