tested multiple recipients and added logic for handling no recipients