send function declared on top b/c on some calls it was undefined?!