added error message for empty team