cleanup to allow it to handle multiple connections