put twilio inside a function