Added logic for send