Moved send function