removing outdated onerror parameter to send function