Start of send function